import { translateTitle } from '@/utils/i18n'
const MessageFiledXml = {
  MessageFiledXml: {
    search: {
      form: {
        method: 'ApimMessageFieldXmlQuery',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'MESSAGE_GROUP_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.消息集编号'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'MESSAGE_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.接口编号'),
            labelHidden: false,
          },
          {
            type: 'button',
            label: translateTitle('Dams.APIMinterfaceManagement.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        method: '',
        name: 'dialog',
        field: [
          {
            type: 'checkbox',
            name: 'ID',
            label: '',
            hidden: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_GROUP_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.消息集编号'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_ID',
            label: translateTitle('Dams.APIMinterfaceManagement.接口编号'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'MESSAGE_TYPE',
            label: translateTitle('Dams.APIMinterfaceManagement.消息结构'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'select',
            name: 'ADAPTER_TYPE',
            label: '消息类型',
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
            options: [
              {
                LABEL: '入向',
                CODE: 'I',
              },
              {
                LABEL: '出向',
                CODE: 'O',
              },
              {
                LABEL: '响应',
                CODE: 'R',
              },
            ],
          },
          {
            type: 'input',
            name: 'STD_FIELD',
            label: translateTitle('Dams.APIMinterfaceManagement.MONGO字段名'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'input',
            name: 'XPATH_EXPRESS',
            label: translateTitle('Dams.APIMinterfaceManagement.解析表达式'),
            labelHidden: false,
            disabled_edit: true,
            isRules: true,
          },
          {
            type: 'select',
            name: 'ACTIVE_FLAG',
            label: translateTitle('Dams.APIMinterfaceManagement.激活标志'),
            labelHidden: false,
            isRules: true,
            options: [
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'select',
            name: 'ALLOW_EMPTY_FLAG',
            label: translateTitle('Dams.APIMinterfaceManagement.是否允许为空'),
            labelHidden: false,
            options: [
              {
                LABEL: '允许',
                CODE: 'Y',
              },
              {
                LABEL: '不允许',
                CODE: 'N',
              },
            ],
            value: 'Y',
          },
          {
            type: 'select',
            name: 'IS_TRANSFER_FIELD',
            label: translateTitle('Dams.APIMinterfaceManagement.是否传播字段'),
            labelHidden: false,
            options: [
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.APIMinterfaceManagement.否'),
                CODE: 'N',
              },
            ],
            value: 'N',
          },
          {
            type: 'input',
            name: 'DATA_TYPE',
            label: translateTitle('Dams.APIMinterfaceManagement.字段类型'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'DATA_WIDTH',
            label: translateTitle('Dams.APIMinterfaceManagement.字段长度'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'NAME_SPACE',
            label: translateTitle('Dams.APIMinterfaceManagement.命名空间'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'PARENT_ELEMENT',
            label: translateTitle('Dams.APIMinterfaceManagement.父级节点名称'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'NODE_VALUE',
            label: translateTitle('Dams.APIMinterfaceManagement.节点默认值'),
            labelHidden: false,
          },
          {
            type: 'button',
            label: translateTitle('Dams.APIMinterfaceManagement.提交'),
            labelHidden: true,
            isRules: true,
          },
        ],
      },
    },
    deleteMethod: 'ApimMessageFieldXmlRemove',
    updateMethod: 'ApimMessageFieldXmlUpdat',
    addMethod: 'ApimMessageFieldXmlSava',
    downloadMethod: 'apim.message.field.xml.export',
  },
}
export default MessageFiledXml
